package com.ossjk.oa.system.mapper;

import com.ossjk.oa.system.entity.Post;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;

/**
 * <p>
 * 岗位表 Mapper 接口
 * </p>
 *
 * @author chair
 * @since 2019-01-23
 */

public interface PostMapper extends BaseMapper<Post> {
	@Select("SELECT d.id, e.rname as mder, d.name as remarks, p.name    ,p.`level` ,d.pid   from  employee e,department d,post p,employee_post ep "
			+ "	where  p.did=d.id and p.id =ep.pid and ep.eid=e.id   and   e.id=#{eid}")
	Post findByEid(@Param("eid") String eid);

}
